import request from './request'
// 搜索联想
export function getSearchSuggestion (q) {
  return request({
    method: 'GET',
    url: '/app/v1_0/suggestion',
    params: {
      q
    }
  })
}
// 获取搜索结果
export function getSearchResult (params) {
  return request({
    method: 'GET',
    url: '/app/v1_0/search',
    params
  })
}
// 获取搜索历史
export function getSearchHistory () {
  return request({
    method: 'GET',
    url: '/app/v1_0/search/histories'
  })
}
// 删除用户搜索历史
export function deleteHistory () {
  return request({
    method: 'DELETE',
    url: '/app/v1_0/search/histories'
  })
}
